#include <iostream>
#include <list>
using namespace std;


void show_list(list<int> L)
{ list<int>::iterator p;
  for(p=L.begin(); p!=L.end(); p++)
    cout << *p << " ";
  cout << endl;
}    
  
int a[5] = {32,45,52,64,79};
int b[7] = {13,15,18,26,34,45,77};

list<int> L(a,a+5);
list<int> R(b,b+7);

int main()
{ 
  show_list(L);
  show_list(R);

  L.merge(R);  
  show_list(L);
  show_list(R);
    
  return 0;
}    
